/**
 * <p>Title: liteflow</p>
 * <p>Description: 轻量级的组件式流程框架</p>
 * @author Bryan.Zhang
 * @email weenyc31@163.com
 * @Date 2020/4/1
 */
package io.mft.flow.core.executable.component;

import io.mft.commons.exception.MFTException;
import io.mft.flow.core.FlowExecutor;
import io.mft.flow.core.executable.Executable;

public abstract class NodeComponent implements Executable {

	private String nodeId;

	private FlowExecutor flowExecutor;
	
	

	
	public String getNodeId() {
		return nodeId;
	}

	public void setNodeId(String nodeId) {
		this.nodeId = nodeId;
	}
	
	public void setFlowExecutor(FlowExecutor flowExecutor) {
		this.flowExecutor = flowExecutor;
	}
	public FlowExecutor getFlowExecutor() {
		if (flowExecutor==null) {
			throw new MFTException("未设置FlowExecutor");
		}
		return flowExecutor;
	}
}
